const Usecase = require('../../shared/usecase/Usecase')

class GetRoleDetail extends Usecase {
  constructor({ roleRepo }) {
    super()
    this.roleRepo = roleRepo
  }
  async execute(id) {
    const data = await this.roleRepo.findById(id, {
      include: ['menuList'],
    })
    return data
  }
}

module.exports = GetRoleDetail
